home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 42 / Amiga Format AFCD42 (Issue 126, Aug 1999).iso / -serious- / comms / other / iris / storemsg.irx < prev    next >
Text File  |  1999-05-14  |  1KB  |  77 lines

  1. /* REXX script to transfer message(s) to the Store folder
  2.    $VER: StoreMsg.irx 1.2 (30.6.98) supplied with Iris V1.6
  3. */
  4.  
  5. /* address IRIS removed - now also usable from IRIS.n */
  6.  
  7. options results
  8. options failat 11
  9.  
  10. 'LOCKGUI'
  11.  
  12. signal on break_c
  13.  
  14. 'GETNUMSELECTED'
  15. n = result
  16. if rc > 0 then do
  17.     'ASKCHOICE "Store message(s)" "This script needs at*Nleast V1.3 of Iris." "**_OK"'
  18.     signal break_c
  19. end
  20. else nop
  21. if n = 0 then do
  22.     'ASKCHOICE "Store message(s)" "Select at least one*Nmessage first!" "**_OK"'
  23.     signal break_c
  24. end
  25. else nop
  26.  
  27. dest = "Store"
  28.  
  29. 'GETFOLDER'
  30.  
  31. if result = dest then do
  32.     'ASKCHOICE "Store message(s)" "Impossible action:*NSame folder selected!" "**_OK"'
  33.     signal break_c
  34. end
  35. else nop
  36.  
  37. i = 0
  38. err = ''
  39. 'GETNUMSELECTED'
  40. n = result
  41. if rc > 0 then do
  42.     'ASKCHOICE "Store message(s)" "This script needs at*Nleast V1.3 of Iris." "**_OK"'
  43.     signal break_c
  44. end
  45. else nop
  46. if n = 0 then do
  47.     'ASKCHOICE "Store message(s)" "Did you click on the listview???" "**_OK"'
  48. end
  49. else nop
  50. do i=0 to n-1
  51.     'MESSAGEFILE' i
  52.     msg = result
  53.     if rc > 0 then do
  54.         err = 'Did you click on the listview???'
  55.         leave i
  56.     end
  57.     else nop
  58.     'READMESSAGE "'||msg||'" 0 TO "'||dest||'"'
  59.     if rc > 0 then do
  60.         err = 'The READMESSAGE command failed.'
  61.         leave i
  62.     end
  63.     else nop
  64. end
  65. if err ~= '' then do
  66.     'ASKCHOICE "Store message(s)" "'||err||'" "**_OK"'
  67. end
  68. else do
  69.     'DELETE'
  70. end
  71. signal break_c
  72. exit
  73.  
  74. break_c:
  75. 'UNLOCKGUI'
  76. exit
  77.